package com.delayqueue.core.permanent.executor;

import com.delayqueue.common.task.Task;
import com.delayqueue.core.permanent.PermanentWriter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class PermanentCompletedExecutor implements PermanentExecutor {

    @Autowired
    private PermanentWriter permanentWriter;

    @Override
    public void execute(Task task) {
        permanentWriter.writeCompleted(task);
    }
}
